package com.woniuxy.firstfactory.impl;

import com.woniuxy.firstfactory.Person;

/**
 * @author 罗蔚
 */
public class PersonFactory {
    public Person getPerson(String race) {
        if ("Chinese".equals(race)) {
            return new ChineseImpl();
        } else if ("American".equals(race)) {
            return new AmericanImpl();
        } else {
            return null;
        }
    }

}
